#! /usr/bin/env python 

import rospy
from std_msgs.msg import String
def doMsg(msg):
    rospy.loginfo("订阅到的数据是 %s", msg.data)
    
if __name__ == "__main__":
    rospy.init_node("cuihua_py")
    rospy.Subscriber("fang", String, doMsg)
    rospy.spin()